import SocketController from "../controller/Socket.Controller";
// @ts-ignore
import Router from 'koa-router'
import Tool from "../until/tool";
import AdminController from "../controller/Admin.Controller";

let router = new Router({prefix:"/socket"})


router.get("/getSerialport",SocketController.getSerialPort)

router.post("/changeSerialport",SocketController.changeSerialPort)

router.post("/saveData",AdminController.saveDataList) // 数据存储

router.post("/changeSpeed",SocketController.changeSpeed) //改变速率

router.get("/getModuleNum",SocketController.getModuleNum) // 获取模块的个数

router.get("/addRunDate",Tool.isExisted,AdminController.addRunDate)

export default router